package mrHunter.puzzles.array;

public class Puzzle4 {
    public String inverseNumber(String input){
        //int[] A
        //int c
        String[] AArray=input.split(" ");
        int[] A=new int[AArray.length];
        for(int i=0;i<AArray.length;i++){
            A[i]=Integer.parseInt(AArray[i]);
        }

        int c=0;

        for(int i=0;i<AArray.length;i++){
            for(int j=i;j<AArray.length;j++){
                if(A[i]>A[j]) c++;
            }
        }
        return String.valueOf(c);
    }
}
